package cn.edu.wynu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ConstructorInjectionMain {
    public static void main(String[] args) {
        // 加载 Spring 配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("constructor-injection.xml");

        // 获取 Cat 对象
        Cat cat = (Cat) context.getBean("cat");

        // 输出 Cat 对象的内容
        System.out.println(cat);
    }
}
